package com.guli.common.utils;

import java.math.BigDecimal;

public class RandomUtils {

    public static String generateCode(int length) {
        StringBuilder sb = new StringBuilder();
        for(int x = 0;x < length;x++){
            sb.append(
                new BigDecimal(Math.random()).multiply(BigDecimal.valueOf(10.0)).intValue() + ""
            );
        }
        return sb.toString();
    }


}
